﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CodeCamp.Models.Presenters.PresentersListViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
  <%= Html.Encode( Model.EventDisplayName ) %> | Presenters
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


  <h1 class="title">Presenters</h1>

  <p>
    <%= Html.Encode( Model.Presenters.Count ) %> people have signed up as presenters to date.
    <%= Html.ActionLink( "Sign up to be a presenter today", "Add" ) %>.
  </p>

    <div class="presenters">
    <% foreach ( var presenter in Model.Presenters ) { %>
        <div class="presenter-container">
            <h3 class="presenter-name"><%= Html.ActionLink( presenter.Name, "Details", new { id = presenter.PresenterId } ) %></h3>
            <% if ( !string.IsNullOrEmpty( presenter.TwitterName ) ) 
               { %>
                Twitter: <span class="presenter-twittername"><a href="http://twitter.com/<%= Html.Encode(presenter.TwitterName) %>" target="_blank"><%= Html.Encode( presenter.TwitterName )%></a></span>
            <% } %>
            
            <% if ( !string.IsNullOrEmpty( presenter.BlogUrl ) ) 
               { %>
                &nbsp; | &nbsp; <span class="presenter-twittername"><a href="<%= Html.Encode( presenter.BlogUrl ) %>">Blog</a></span>
            <% } %>

            <% if ( !string.IsNullOrEmpty( presenter.WebsiteUrl ) ) 
               { %>
                &nbsp; | &nbsp; <span class="presenter-twittername"><a href="<%= Html.Encode( presenter.WebsiteUrl ) %>">Website</a></span>
            <% } %>

            <div>
              Sessions:
              <ul>
                <% foreach ( var session in presenter.Sessions )
                   { %>
                      <li><%= Html.ActionLink( session.Title, "Details", "Sessions", new { id = session.SessionId }, null ) %></li>
                <% } %>
              </ul>
            </div>

            <p><%= Html.Encode( presenter.Biography )%></p>
        </div>
    <% } %>
    </div>


</asp:Content>
